﻿using System;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.mssql;

namespace SharpSqlAnalyzer.stmt.mssql
{
	// Token: 0x02000188 RID: 392
	public class TMssqlThrow : TCustomSqlStatement
	{
		// Token: 0x17000284 RID: 644
		// (get) Token: 0x06000DC9 RID: 3529 RVA: 0x0030916C File Offset: 0x0030736C
		// (set) Token: 0x06000DCA RID: 3530 RVA: 0x00309174 File Offset: 0x00307374
		public virtual TExpression ErrorCode
		{
			get
			{
				return this.errorCode;
			}
			set
			{
				this.errorCode = value;
			}
		}

		// Token: 0x17000285 RID: 645
		// (get) Token: 0x06000DCB RID: 3531 RVA: 0x0030917D File Offset: 0x0030737D
		// (set) Token: 0x06000DCC RID: 3532 RVA: 0x00309185 File Offset: 0x00307385
		public virtual TExpression ErrorMessage
		{
			get
			{
				return this.errorMessage;
			}
			set
			{
				this.errorMessage = value;
			}
		}

		// Token: 0x17000286 RID: 646
		// (get) Token: 0x06000DCD RID: 3533 RVA: 0x0030918E File Offset: 0x0030738E
		// (set) Token: 0x06000DCE RID: 3534 RVA: 0x00309196 File Offset: 0x00307396
		public virtual TExpression ErrorState
		{
			get
			{
				return this.errorState;
			}
			set
			{
				this.errorState = value;
			}
		}

		// Token: 0x06000DCF RID: 3535 RVA: 0x0030919F File Offset: 0x0030739F
		public TMssqlThrow(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstmssqlthrow;
		}

		// Token: 0x06000DD0 RID: 3536 RVA: 0x003091B4 File Offset: 0x003073B4
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			TMssqlThrowSqlNode tmssqlThrowSqlNode = (TMssqlThrowSqlNode)this.rootNode;
			base.doParseStatement(psql);
			this.errorCode = tmssqlThrowSqlNode.ErrorCode;
			this.errorMessage = tmssqlThrowSqlNode.ErrorMessage;
			this.errorState = tmssqlThrowSqlNode.ErrorState;
			return 0;
		}

		// Token: 0x06000DD1 RID: 3537 RVA: 0x00309204 File Offset: 0x00307404
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000DD2 RID: 3538 RVA: 0x00309214 File Offset: 0x00307414
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x0400131C RID: 4892
		private TExpression errorCode;

		// Token: 0x0400131D RID: 4893
		private TExpression errorMessage;

		// Token: 0x0400131E RID: 4894
		private TExpression errorState;
	}
}
